< previous page page_610 next page >

Page 610
Day 15, Adding Advanced Features
Quiz
8694cbadb9b1ef7075903f6f95fc1db2.gif
1. The SetData method is used to place data into the DataObject when the OLEStarDrag event is triggered, or it can be used in the OLESetData event.
8694cbadb9b1ef7075903f6f95fc1db2.gif
2. Feedback is given to the user when the OLE drag-and-drop operation has been completed in the OLECompleteDrag event, which is triggered when the process is finished.
Exercise
The best way to process a delete is to use the delete routine already present in the frmAddressEntry form. The code in Listing A.7 shows how to do this without users seeing the entry form itself.
LISTING A.7. DELETEENTRY.TXTDELETING AN ENTRY WITH THEcmdDeleteCLICK EVENT ROUTINE IN THEAddressEntryFORM.

8694cbadb9b1ef7075903f6f95fc1db2.gif
Private Sub picDelete_OLEDragDrop(Data As DataObject, Effect As Long, _
   Button As Integer, Shift As Integer, X As Single, Y As Single)
    frmAddressEntry.sqlEntry = select * from [Address Entry] Where _
            [AddressID] =  & Mid(tvTreeView.SelectedItem.Key, 1, 3)
    frmAddressEntry.Load
    frmAddressEntry.Visible = False
    frmAddressEntry.cmdDelete.Value = True
End Sub

Day 16, Coping with Error Handling
Quiz
8694cbadb9b1ef7075903f6f95fc1db2.gif
1. An error trap is a term that describes the detection of an error during the execution of an application.
8694cbadb9b1ef7075903f6f95fc1db2.gif
2. The first type is one that can be found and corrected during the testing process; the other type must be handled during the normal execution of the application.
8694cbadb9b1ef7075903f6f95fc1db2.gif
3. There are three ways to have your application code continue after an error has occurred. You can use any of the Resume statement versions: Resume [Line ¦ Label], Resume Next, or Resume.

 
< previous page page_610 next page >

If you like this book, buy it!